<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<!--Head-->
<head>
    <meta charset="utf-8" />
    <title>奖读后台管理系统</title>
    <meta name="description" content="login page" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="shortcut icon" href="<?= STATICURL; ?>img/favicon.png" type="image/x-icon">
    <!--Basic Styles-->
    <link href="<?= STATICURL; ?>css/bootstrap.min.css" rel="stylesheet" />
    <link id="bootstrap-rtl-link" href="" rel="stylesheet" />
    <link href="<?= STATICURL; ?>css/font-awesome.min.css" rel="stylesheet" />
    <!--Fonts-->

    <!--Beyond styles-->
    <link id="beyond-link" href="<?= STATICURL; ?>css/beyond.min.css" rel="stylesheet" />
    <link href="<?= STATICURL; ?>css/animate.min.css" rel="stylesheet" />
    <link id="skin-link" href="" rel="stylesheet" type="text/css" />
    
    <!--Skin Script: Place this script in head to load scripts for skins and rtl support-->
    <script type="text/javascript">
        var  beyond_css = "<?= STATICURL; ?>css/beyond.css";
    </script>
    <script src="<?= STATICURL; ?>js/skins.min.js"></script>
</head>
<!--Head Ends-->
<!--Body-->
<body>
    <div class="login-container animated fadeInDown">
            <div class="loginbox bg-white">
                <div class="loginbox-title">登  录</div>
                <div class="loginbox-social">
                    <div class="social-title ">奖读后台管理系统</div>
                </div>
                <div class="loginbox-or">
                    <div class="or-line"></div>
                </div>
                <div class="loginbox-textbox">
                    <input type="text" id="username" value="<?= $this->input->cookie('username');?>"  class="form-control" placeholder="Email" />
                </div>
                <div class="loginbox-textbox">
                    <input type="password" id="password"   class="form-control" placeholder="Password" />
                </div>
                <div class="loginbox-submit">
                    <input id="J_login" onclick="J_login()" type="button"  class="btn btn-primary btn-block" value="登录">
                </div>
				
            </div>
			<br />
			<div style="color:gray;padding-left:10px;">请使用Firefox, Chrome, IE9+浏览器达到更好效果</div>
    </div>

    <!--Basic Scripts-->
    <script src="<?= STATICURL; ?>js/jquery-2.0.3.min.js"></script>
    <script src="<?= STATICURL; ?>js/bootstrap.min.js"></script>
    <!--Beyond Scripts-->
</body>
<!--Body Ends-->
</html>
<script>
function J_login(){
        var username = $("#username").val();
        var password = $("#password").val();
        if(username == '' || username == "请输入用户名/邮箱")
        {
            alert("用户名/邮箱不能为空");
            $("#username").focus();
            return false;
        }
        if(password == '' || password == "●●●●●●")
        {
             alert("密码不能为空");
             $("#password").focus();
             return false;
        }
         $.post("/luckydog/login/login_manager",{"username":username,"password":password},function(data){
            if(data.code == 0)
            {
                window.location.href="<?=BASEURL?>luckydog/"+data.page;
            }else{
                alert(data.message);
               window.location.reload();
            }
        },"json");
   };
</script>
